package com.shop.domain.system;

import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>实体类</p>
 * <p>Table: t_pay_config - 支付明细表</p>
 * @author generator
 * @date 2020-11-20 09:05:39
 */
@ApiModel("NewSystemConfig 新系统配置表")
@Data
@Entity
@Table(name="t_new_system_config")
@SQLDelete(sql = "update t_new_system_config set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class NewSystemConfig extends BaseDomain implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id", hidden = true)
    @Column(name = "id")
    @JSONField(serialize=false)
    private Long id;

    /**
     * 类别
     */
    @Column(name = "category")
    @ApiModelProperty("类别")
    private String category;

    /**
     * 名称
     */
    @Column(name = "code")
    @ApiModelProperty("名称")
    private String code;

    /**
     * 备注
     */
    @Column(name = "remark")
    @ApiModelProperty("备注")
    private String remark;

    /**
     * 值
     */
    @Column(name = "value")
    @ApiModelProperty("值")
    private String value;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty("创建时间")
    @JSONField(serialize=false)
    private Date createTime;

    /**
     * 修改时间
     */
    @Column(name = "update_time")
    @ApiModelProperty("修改时间")
    @JSONField(serialize=false)
    private Date updateTime;

    /**
     * 是否删除 0 否 1 是
     */
    @Column(name = "is_deleted")
    @ApiModelProperty("是否删除 0 否 1 是")
    @JSONField(serialize=false)
    private Integer isDeleted;
}